// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	8/2/2013 8:17:59 PM				
// -----------------------------

#include "LuaAssert.h"
#include <stdio.h>

#ifdef _WIN32
#	define WIN32_LEAN_AND_MEAN
#	include <Windows.h>
#endif

namespace ObjectLua
{

	void LuaAssert(bool expression , const char* descr, const char* file, int line)
	{
		const size_t bufferLen = 1024;
		char msg[bufferLen];
		_snprintf(msg , bufferLen , "%s(%i) : %s\n" , file , line , descr);
		msg[bufferLen - 1] = '\0';
		::fputs(msg,stderr);
	}

	void LuaBreak()
	{
		#ifdef _WIN32
		DebugBreak();
		#endif
	}

}